package com.it.shiro.utils;

import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.util.ByteSource;

/**
 * ClassName:PasswordEncode
 * Package:com.it.shiro.utils
 * Description: 描述信息
 *
 * @date:2022/3/31 18:15
 * @author:动力节点
 */
public class PasswordEncode {

    public static String encode(String password){
        SimpleHash simpleHash = new SimpleHash("MD5", ByteSource.Util.bytes(password),ByteSource.Util.bytes("salt"),3);
        return simpleHash.toString();
    }
}
